import request from '@/utils/request'

// 查询教师管理列表
export function listTeacherManage(query) {
  return request({
    url: '/ysg/teacherManage/list',
    method: 'get',
    params: query
  })
}

// 查询教师管理详细
export function getTeacherManage(id) {
  return request({
    url: '/ysg/teacherManage/' + id,
    method: 'get'
  })
}

// 新增教师管理
export function addTeacherManage(data) {
  return request({
    url: '/ysg/teacherManage',
    method: 'post',
    data: data
  })
}

// 修改教师管理
export function updateTeacherManage(data) {
  return request({
    url: '/ysg/teacherManage',
    method: 'put',
    data: data
  })
}

// 删除教师管理
export function delTeacherManage(id) {
  return request({
    url: '/ysg/teacherManage/' + id,
    method: 'delete'
  })
}

// 查询未绑定用户列表
export function unAssociatedUserList(query) {
  return request({
    url: '/ysg/teacherManage/unAssociatedUserList',
    method: 'get',
    params: query
  })
}

// 查询已绑定用户列表
export function associatedUserList(query) {
  return request({
    url: '/ysg/teacherManage/getAssociatedUser',
    method: 'get',
    params: query
  })
}

// 绑定用户
export function associate(data) {
  return request({
    url: '/ysg/teacherManage/associate',
    method: 'post',
    data: data
  })
}

// 解除绑定用户
export function unAssociate(data) {
  return request({
    url: '/ysg/teacherManage/unAssociate',
    method: 'post',
    data: data
  })
}
